package acwing.dfs;

import java.util.Scanner;

/**
 * 数的划分
 *
 * @author yang
 * @date 2021/12/19
 */
public class 数的划分 {

    static int[][] dp = new int[10][206];

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        System.out.println(dfs(k,n));
    }

    private static int dfs(int k, int n) {
        if (k > n || k == 0) return 0;
        if (k == 1) return 1;
        if (dp[k][n] != 0) return dp[k][n];
        return dp[k][n] = dfs(k-1,n-1) + dfs(k,n-k);
    }
}
